<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<div id="clusterModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<form class="form-horizontal" name="clusterForm" ng-submit="saveCluster()">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title">
						<i class="mark"></i> 
						<span>新增修改集群</span>
					</h4>
				</div>
				<div class="modal-body">
						<div class="form-group has-feedback" ng-class="{'has-error' : clusterForm.name.$invalid && clusterForm.name.$dirty, 
							'has-warning': clusterForm.name.$invalid && !clusterForm.name.$dirty}">
							<label class="col-sm-2 control-label control-label-sm">集群名称:</label>
							<div class="col-sm-8">
								<input type="text" class="form-control input-sm" name="name" ng-model="clusterVO.name" 
									id="clusterName" ng-required="true"/>
								<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true" 
									ng-show="clusterForm.name.$invalid && clusterForm.name.$dirty"></span>
								<span class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"
									ng-show="clusterForm.name.$invalid && !clusterForm.name.$dirty"></span>
							</div>
						</div>
						<div class="form-group has-feedback" ng-class="{'has-error' : clusterForm.name.$invalid && clusterForm.name.$dirty, 
							'has-warning': clusterForm.name.$invalid && !clusterForm.name.$dirty}">
							<label class="col-sm-2 control-label control-label-sm">地址:</label>
							<div class="col-sm-8">
								<input type="text" class="form-control input-sm" name="serverAddrs" ng-model="clusterVO.serverAddrs" 
									placeholder="格式：127.0.0.1:1314;127.0.0.2:1314" ng-required="true"/>
								<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true" 
									ng-show="clusterForm.serverAddrs.$invalid && clusterForm.serverAddrs.$dirty"></span>
								<span class="glyphicon glyphicon-warning-sign form-control-feedback" ria-hidden="true"
									ng-show="clusterForm.serverAddrs.$invalid && !clusterForm.serverAddrs.$dirty"></span>
							</div>
						</div>
				</div>
				<div class="modal-footer">
					<div class="modal-footer-button">
						<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">取消</button>
						<button type="submit" class="btn btn-sm btn-blue">确认</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
